<script type="text/javascript">	
	edittext('footer1');
</script>	
<script type="text/javascript">	
	$.metadata.setType("attr", "validate");
	$().ready(function() {
		$("#add").validate();
	});	
</script>
<style type="text/css">
	.form-add input {
		width: 430px;
		margin-bottom:0;
	}
	.error {
		font-style: italic;
		padding-left: 5px;
	}
</style>
<!-- phần nội dung quản lý - bên phải -->
<div id="content-right">
	<div id="add-product">
		<div id="sidebar-top-product" class="black">
			<div id="img-product" class="left white">
				 <?php echo $title; ?>
			</div>
			<div id="img-back" class="right white">
				<a class="white" href="javascript:;" onclick="history.go(-1)">Quay lại trang trước</a> 
			</div>
			<div class="clear"></div>
		</div>
		<div class="form-product">
			<form action="" method="post" name="add" id="add">
				<?php foreach ($admin_config as $index) {?>
					<input type="hidden" name="id" value="<?php echo $index['id']?>" />
					<div class="form-add">
						<label class="left black">Tiêu đề website: </label>
						<input type="text" class="required" name="title_website" value="<?php echo $index['name_web']?>"></input>
					</div>
					<div class="form-add">
						<label class="left black">Favicon: </label>
						<input name="favicon" value="<?php echo $index['favicon']?>" type="text" id="favicon" />
						<a onclick="JavaScript:OpenFileManager('favicon','logo');" href="javascript:"><b style="color:blue;">Chọn ảnh</b></a>
					</div>
					<div class="form-add">
						<label class="left black">Logo website: </label>
						<input name="image" value="<?php echo $index['logo']?>" type="text" id="image" onclick="JavaScript:OpenFileManager('image','logo');" />
						<a onclick="JavaScript:OpenFileManager('image','logo');" href="javascript:"><b style="color:blue;">Chọn ảnh</b></a>
					</div>
					<div class="form-add">
						<label class="left black">Mô tả website: </label>
						<textarea type="text" name="desc_website" style="height:100px;"><?php echo $index['desc_web']?></textarea>
					</div>
					<div class="form-add">
						<label class="left black">Keywords website: </label>
						<input type="text" name="key_word" value="<?php echo $index['keyword']?>"></input>
					</div>
					<div class="form-add">
						<label class="left black">Copyright: </label>
						<input type="text" name="copyright" value="<?php echo $index['copyright']?>"></input>
					</div>
					<div class="form-add">
						<label class="left black">Tên Công ty: </label>
						<input type="text" name="com_name" value="<?php echo $index['com_name']?>"></input>
					</div>
					<div class="form-add">
						<label class="left black">Địa chỉ: </label>
						<input type="text" name="com_address" value="<?php echo $index['com_address']?>"></input>
					</div>
					<div class="form-add">
						<label class="left black">Điện thoại: </label>
						<input type="text" name="com_tel" value="<?php echo $index['com_tel']?>"></input>
					</div>
					<div class="form-add">
						<label class="left black">Mobile: </label>
						<input type="text" name="mobile" value="<?php echo $index['mobile']?>"></input>
					</div>
					<div class="form-add">
						<label class="left black">Email liên hệ: </label>
						<input type="text" name="email_contact" value="<?php echo $index['email_contact']?>"></input>
					</div>
					<div class="form-add">
						<label class="left black">Fax: </label>
						<input type="text" name="com_fax" value="<?php echo $index['com_fax']?>"></input>
					</div>
					<div class="form-add">
						<label class="left black">Email: </label>
						<input type="text" name="email" value="<?php echo $index['email']?>"></input>
					</div>
					<div class="form-add">
						<label class="left black">Hotline: </label>
						<textarea name="hotline"><?php echo $index['hotline']?></textarea>						
					</div>
					<div class="form-add">
						<label class="left black">Footer: </label>
						<textarea type="text" name="footer" id="footer1" style="height:100px;"><?php echo $index['footer']?></textarea>
					</div>
					<div class="form-add">
						<label class="left black">Alexa ID: </label>
						<textarea name="alexa_id"><?php echo $index['alexa_id']?></textarea>						
					</div>
					<div class="form-add">
						<label class="left black">Google_analytics: </label>
						<textarea name="google_analytics"><?php echo $index['google_analytics']?></textarea>						
					</div>
					<div class="form-add">
						<label class="left black">Khóa website: </label>
						<input type="checkbox" name="lock_website" id="lock_website" <?php if ($index['lock_web'] == 1) echo 'checked=checked'?> onclick="if (!document.getElementById('hidden').disabled) document.getElementById('hidden').disabled='disabled'; else document.getElementById('hidden').disabled='';" />
					</div>
					<div class="form-add">
						<label class="left black">Thông tin về khóa website: </label>
						<textarea <?php if ($index['lock_web'] == 0) echo 'disabled=disabled'?> id="hidden" type="text" name="message_lock_website" style="height:50px;"><?php echo $index['message']?></textarea>
					</div>
				<?php }?>
				<div class="clear"></div>
				<div class="button-product">
					<input type="submit" class="submit-product" name="cmd" value="Update" style="color: #FFF; font-weight: bold; padding-bottom: 5px;" />
					<input type="reset" class="reset-product"  value='Cancel' style="color: #FFF; font-weight: bold; padding-bottom: 5px;" />
				</div>
				<div class="clear"></div>
			</form>                  
		</div>
	</div>
</div><!-- end  content-right -->